import 'dart:convert' as convert;
import 'package:crypto/crypto.dart' as crypto;
import 'package:convert/convert.dart' as convert ;
// md5 加密
String generateMd5(String data) {
  var content = new convert. Utf8Encoder().convert(data);
  var digest = crypto.md5.convert(content);
  // 这里其实就是 digest.toString()
  return convert.hex.encode(digest.bytes);
}